<?$this->includeHeader();
$District	= &$this->GetPageElement('DISTRICT');
$Cities		= &$this->GetPageElement('CITIES');
$Alph			= &$this->GetPageElement('ALPH');
?>
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
	<td width="190" valign="top">
		<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#e6f0f6" class="black12">
		<tr>
			<td width="7" height="7"><img src="/system/templates/default/images/w5_1.png" width="7" height="7"></td>
			<td></td>
			<td width="7"><img src="/system/templates/default/images/w5_2.png" width="7" height="7"></td>
		</tr>
		<tr>
			<td></td>
			<td valign="top">Блок слева </td>
			<td></td>
		</tr>
		<tr>
			<td height="7"><img src="/system/templates/default/images/w5_3.png" width="7" height="7"></td>
			<td></td>
			<td><img src="/system/templates/default/images/w5_4.png" width="7" height="7"></td>
		</tr>
		</table>
	</td>
	<td valign="top" style="padding-left:15px">
		<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#e6f0f6" class="black12">
		<tr bgcolor="#FFFF88">
			<td width="7" valign="top" bgcolor="#f9cf58"><img src="/system/templates/default/images/w5_1.png" width="7" height="7"></td>
			<td height="25" colspan="3" bgcolor="#f9cf58"><h1><?=$District['PAGE_H1']?></h1></td>
			<td width="7" valign="top" bgcolor="#f9cf58"><img src="/system/templates/default/images/w5_2.png" width="7" height="7"></td>
		</tr>
		<tr><td height="1" colspan="5" background="/system/templates/default/images/line_2.gif"></td></tr>
		<tr>
			<td height="25"></td>
			<td colspan="3" style="padding-top:7px">
				<?if (is_array($this->crumbs)) {
					echo '<p class="gray11">';
					foreach ($this->crumbs as $HREF => $TEXT) {
						if ($HREF != '') {
						echo '<a href="',$HREF,'">',$TEXT,'</a> -> ';
						} else {echo $TEXT;}
					}
					echo '</p>';
				}
				?>
				<table width="100%" cellpadding="0" cellspacing="0" class="black12">
				<tr valign="top">
					<?if ($Cities) {
						$nColumns = 4;
						$PerCol = ceil($Cities['COUNT']/$nColumns);
						$AlphArray = array(1=>'А', 2=>'Б', 3=>'В', 4=>'Г', 5=>'Д', 6=>'Е', 7=>'Ё', 8=>'Ж', 9=>'З', 10=>'И', 11=>'Й', 12=>'К', 13=>'Л', 14=>'М', 15=>'Н', 16=>'О', 17=>'П', 18=>'Р', 19=>'С', 20=>'Т', 21=>'У', 22=>'Ф', 23=>'Х', 24=>'Ц', 25=>'Ч', 26=>'Ш', 27=>'Щ', 28=>'Ы', 29=>'Э', 30=>'Ю', 31=>'Я');
						echo '<td style="padding:0 4px">';
						$iCit = 0;
						$nextCol = $iCit + $PerCol;
						foreach ($Alph as $Index => $A) {
							echo '<h3 style="margin-top:0">', $AlphArray[$Index], '</h3>';
							for (; $iCit < $Cities['COUNT']; ++$iCit) {
								$City = &$Cities[$iCit];
								$br = TRUE;
								if ($iCit == $nextCol) {
									echo '</td>
									<td width="11" valign="top" background="/system/templates/default/images/line_vert_blue_1.gif"><img src="/system/templates/default/images/line_vert_blue_1.gif" width="11" height="6"></td>
									<td style="padding:0 4px">';
									$nextCol += $PerCol;
									$br = FALSE;
								}
								if ($iCit == $A) {if ($br) {echo '<br />';} break;}
								echo '<a href="',$City['URL'],'">',$City['NAME'],'</a><br />';
							}
						}
						echo '</td>';
				}?>
				<?/*if (!is_null($Districts)) {
					function CitiesColumn($iDist, &$Districts, $nColumns) {
						while(isset($Districts[$iDist])) {
							$District = &$Districts[$iDist];
							echo '<p><a href="',$District['URL'],'"><strong>',$District['NAME'],':</strong></a></p>
							<ul>';
							foreach ($District['CITIES'] as $Index => $City) {
								echo '<li><a href="',$City['URL'],'">',$City['NAME'],'</a></li>';
							}
							echo '<li><a href="',$District['URL'],'">Другие...</a></li>
							</ul>';
							$iDist += $nColumns;
						}
					}
					$nColumns = 4;
					for ($iColumn = 0; $iColumn < $nColumns; ++$iColumn) {
						echo '<td valign="top">';
						CitiesColumn($iColumn, $Districts, $nColumns);
						echo '</td>';
						if ($iColumn != ($nColumns - 1)) {echo '<td width="11" valign="top" background="/system/templates/default/images/line_vert_blue_1.gif"><img src="/system/templates/default/images/line_vert_blue_1.gif" width="11" height="6"></td>';}
					}
				}*/?>
				</tr>
				</table>                    
			</td>
			<td></td>
		</tr>
		<tr>
			<td height="7"><img src="/system/templates/default/images/w5_3.png" width="7" height="7"></td>
			<td></td>
			<td></td>
			<td></td>
			<td><img src="/system/templates/default/images/w5_4.png" width="7" height="7"></td>
		</tr>
		</table>
	</td>
</tr>
</table>
<?$this->includeFooter();?>